package com.learner.course;

import com.learner.common.jpa.SimpleJpaRepositoryImpl;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author ice2020x
 * @Description: 启动类
 */
@EnableDiscoveryClient
@EntityScan(basePackages ={"com.learner.pojo.course"})
@MapperScan(basePackages ={"com.learner.course.mapper"})
@EnableJpaRepositories(basePackages = "com.learner.course.repository",repositoryBaseClass = SimpleJpaRepositoryImpl.class)
@ComponentScan(basePackages={"com.learner.common"})
@ComponentScan(basePackages={"com.learner.course"})
@EnableJpaAuditing
@EnableFeignClients
@EnableTransactionManagement
@SpringBootApplication(exclude = {JpaRepositoriesAutoConfiguration.class})
public class ManageCourseApplication {
    public static void main(String[] args) throws Exception {
        SpringApplication.run(ManageCourseApplication.class, args);
    }
}
